package com.boot.security.server.model;


import cn.hutool.core.date.DateUtil;
import com.boot.security.server.utils.AppConstants;
import com.boot.security.server.utils.DateUtils;

public class AppTradePayno extends BaseEntity<Long> {

	private Integer fid;
	private String tradepaynoid;
	private String outtradeno;
	private String authcode;
	private String totalamount;
	private String subject;
	private String hostcode;
	private String refundno;
	private String notifyid;
	private String notifytime;
	private String buyeremail;
	private String selleremail;
	private String gmtcreate;
	private String batchno;
	private String gmtrefund;
	private String refundstatus;
	private String applypeople;
	private String applyphone;
	private String applysocial;
	private String patientname;
	private String patientsex;
	private String patientsocial;
	private String patientphone;
	private String orderstatus;
	private String feestatus;
	private String orderno;
	private String tradeno;
	private String orderdate;
	private String patientid;
	private String times;
	private String paytype;
	private String chequtype;

	public Integer getFid() {
		return fid;
	}
	public void setFid(Integer fid) {
		this.fid = fid;
	}
	public String getTradepaynoid() {
		return tradepaynoid;
	}
	public void setTradepaynoid(String tradepaynoid) {
		this.tradepaynoid = tradepaynoid;
	}
	public String getOuttradeno() {
		return outtradeno;
	}
	public void setOuttradeno(String outtradeno) {
		this.outtradeno = outtradeno;
	}
	public String getAuthcode() {
		return authcode;
	}
	public void setAuthcode(String authcode) {
		this.authcode = authcode;
	}
	public String getTotalamount() {
		return totalamount;
	}
	public void setTotalamount(String totalamount) {
		this.totalamount = totalamount;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getHostcode() {
		return hostcode;
	}
	public void setHostcode(String hostcode) {
		this.hostcode = hostcode;
	}
	public String getRefundno() {
		return refundno;
	}
	public void setRefundno(String refundno) {
		this.refundno = refundno;
	}
	public String getNotifyid() {
		return notifyid;
	}
	public void setNotifyid(String notifyid) {
		this.notifyid = notifyid;
	}
	public String getNotifytime() {
		return notifytime;
	}
	public void setNotifytime(String notifytime) {
		this.notifytime = notifytime;
	}
	public String getBuyeremail() {
		return buyeremail;
	}
	public void setBuyeremail(String buyeremail) {
		this.buyeremail = buyeremail;
	}
	public String getSelleremail() {
		return selleremail;
	}
	public void setSelleremail(String selleremail) {
		this.selleremail = selleremail;
	}
	public String getGmtcreate() {
		return gmtcreate;
	}
	public void setGmtcreate(String gmtcreate) {
		this.gmtcreate = gmtcreate;
	}
	public String getBatchno() {
		return batchno;
	}
	public void setBatchno(String batchno) {
		this.batchno = batchno;
	}
	public String getGmtrefund() {
		return gmtrefund;
	}
	public void setGmtrefund(String gmtrefund) {
		this.gmtrefund = gmtrefund;
	}
	public String getRefundstatus() {
		return refundstatus;
	}
	public void setRefundstatus(String refundstatus) {
		this.refundstatus = refundstatus;
	}
	public String getApplypeople() {
		return applypeople;
	}
	public void setApplypeople(String applypeople) {
		this.applypeople = applypeople;
	}
	public String getApplyphone() {
		return applyphone;
	}
	public void setApplyphone(String applyphone) {
		this.applyphone = applyphone;
	}
	public String getApplysocial() {
		return applysocial;
	}
	public void setApplysocial(String applysocial) {
		this.applysocial = applysocial;
	}
	public String getPatientname() {
		return patientname;
	}
	public void setPatientname(String patientname) {
		this.patientname = patientname;
	}
	public String getPatientsex() {
		return patientsex;
	}
	public void setPatientsex(String patientsex) {
		this.patientsex = patientsex;
	}
	public String getPatientsocial() {
		return patientsocial;
	}
	public void setPatientsocial(String patientsocial) {
		this.patientsocial = patientsocial;
	}
	public String getPatientphone() {
		return patientphone;
	}
	public void setPatientphone(String patientphone) {
		this.patientphone = patientphone;
	}
	public String getOrderstatus() {
		return orderstatus;
	}
	public void setOrderstatus(String orderstatus) {
		this.orderstatus = orderstatus;
	}
	public String getFeestatus() {
		return feestatus;
	}
	public void setFeestatus(String feestatus) {
		this.feestatus = feestatus;
	}
	public String getOrderno() {
		return orderno;
	}
	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}
	public String getTradeno() {
		return tradeno;
	}
	public void setTradeno(String tradeno) {
		this.tradeno = tradeno;
	}
	public String getOrderdate() {
		return orderdate;
	}
	public void setOrderdate(String orderdate) {
		this.orderdate = orderdate;
	}
	public String getPatientid() {
		return patientid;
	}
	public void setPatientid(String patientid) {
		this.patientid = patientid;
	}
	public String getTimes() {
		return times;
	}
	public void setTimes(String times) {
		this.times = times;
	}
	public String getPaytype() {
		return paytype;
	}
	public void setPaytype(String paytype) {
		this.paytype = paytype;
	}
	public String getChequtype() {
		return chequtype;
	}
	public void setChequtype(String chequtype) {
		this.chequtype = chequtype;
	}

	public AppTradePayno() {};
	public AppTradePayno(AppPaymentOrder order,AppAccount account) {
		this.outtradeno=DateUtils.getTimestampID(); //支付订单号
		this.totalamount=order.getFee(); //订单总金额
		this.subject="诊疗服务费用";//订单标题
		this.hostcode=order.getHostcode();//医院编码
		this.gmtcreate=DateUtil.now();//订单创建时间
		this.applypeople=order.getPatientname();//下单人姓名
		this.applysocial=order.getIdcard();
		this.patientid=account.getPatientid();
		this.patientname=account.getRealName();
		this.patientphone=account.getPhoneNo();
		this.patientsex=account.getSex();
		this.patientsocial=account.getIdCard();
		this.times=order.getTimes()==null?null:order.getTimes().toString();
		this.orderstatus=AppConstants.ORDER_STATUS_DEFAULT;
		this.feestatus=AppConstants.FEE_STATUS_DEFAULT;
		this.orderno=order.getApppayid().toString();  //订单号
		this.tradeno=order.getTradeno().toString();  //交易号
		this.orderdate=DateUtil.now();//下单时间
	};
}
